package com.xbongbong.pro.productcategory.pojo.dto;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/3/22 16:00
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ProductCategoryAddDTO extends BaseDTO {

    private static final long serialVersionUID = 4279392093060513220L;
    /**
     * 名称
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @Length(max = 30, message = "{dto.msg.productCategoryAdd.name.Length}")
    @NotEmpty(message = "{dto.msg.productCategoryAdd.name.NotEmpty}")
    private String name;

    /**
     * 父类id
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long parentId;

    /**
     * 删除标识
     * @see com.xbongbong.paas.enums.DelEnum
     */
    private Integer del;
    /**
     * 路由
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String router;

    public ProductCategoryAddDTO() {
        del = DelEnum.NORMAL.getDel();
        parentId = 0L;
        router = "";
    }
}
